import java.util.Arrays;
import java.util.Scanner;

/**
 * @author vivi
 * @description
 * @date 2024/4/23
 */
public class demo1 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        int[] arr = new int[6];

        while(t-- != 0)
        {
            for(int i = 0; i < 6; i++) arr[i] = in.nextInt();
            Arrays.sort(arr);

            if(arr[0] + arr[1] > arr[2] && arr[3] + arr[4] > arr[5] ||
                    arr[0] + arr[2] > arr[3] && arr[1] + arr[4] > arr[5] ||
                    arr[0] + arr[3] > arr[4] && arr[1] + arr[2] > arr[5] ||
                    arr[0] + arr[4] > arr[5] && arr[1] + arr[2] > arr[3])
            {
                System.out.println("Yes");
            }
            else
            {
                System.out.println("No");
            }
        }
    }
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.next();
        char[] arr = str.toCharArray(); //把输入的字符串转为字符型数组
        StringBuffer newArr = new StringBuffer(); //定义要输出的数字
        int[] count = new int[newArr.length() +
                1]; //把每个元素出现的次数放入count数组中
        for (int i = 0; i< arr.length; i++) {
            if (arr[i] >= '0' && arr[i] <= '9' && count[arr[i]%count.length] == 0) {
                newArr.append(arr[i]);
                count[arr[i]%count.length]++;
            }
        }
        System.out.println(newArr);
    }
}
